<?php

namespace oa\models;

use Yii;

/**
 * This is the model class for table "contract_product".
 *
 * @property int $id
 * @property int $cid
 * @property int $pd_id
 * @property int $amount 多个单位为最小单位数量
 * @property string $remark
 * @property int $is_del
 * @property int $aid
 * @property int $updated_at
 * @property int $created_at
 */
class ContractProduct extends BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'contract_product';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['cid', 'pd_id', 'amount'], 'required'],
            [['cid', 'pd_id', 'amount', 'is_del', 'aid', 'updated_at', 'created_at'], 'integer'],
            [['remark'], 'string', 'max' => 100],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'cid' => 'Cid',
            'pd_id' => 'Pd ID',
            'amount' => 'Amount',
            'remark' => 'Remark',
            'is_del' => 'Is Del',
            'aid' => 'Aid',
            'updated_at' => 'Updated At',
            'created_at' => 'Created At',
        ];
    }
}
